Query Builder
Developed by Brad Wery [TeamPB]
bradwery@gmail.com
-----------------------------------

This is my attempt at duplicating PowerBuilders datawindow querybuilder. Hopefully you will find it usefull.


How To Use:
-----------------------------------
1. Place the u_cst_querybuilder usercontrol onto your window.
2. Set it's transaction object so that it can retrieve your databases schema.
	- of_SetTransactionObject(SQLCA)
3. Right click on the client area (big white area) to open the table list dialog box.

Creating Links:
-----------------------------------
1. Hold the Shift key down.
2. Click on a column in one table.
3. While still holding the Shift key, click on a coloumn in the second table.
4. Modify the join by clicking on the relationship box ([=])
5. To cancel a join while in the process of creating it simply click on the client area.


Usefull Methods:
-----------------------------------
The following methods will help you interact with the userobject.

1. of_AddTable()
	- Opens the table list dialog box.

2. of_GetSyntax()
	- Returns the built SQL statement.

3. of_SaveQuery()
	Saves the current query. If no save was previously done the user is prompted to select a file.
   of_SaveQueryAs()
	Prompts the user for a file and saves the current query
   of_SaveQueryAs(string as_file)
	Saves the current query using the specified file name

4. of_OpenQuery()
	Prompts the user for a file then opens the file displaying the query
   of_OpenQuery(string as_file)
	Opens the query contained in the specified file.


Syntax Highlighting:
-----------------------------------
Syntax highlighting is achieved with the use Scintilla. Scintilla is a free open source edit control.
To make it work simply download SciLexer.dll from www.scintilla.org and place it in your System32 folder.

i.e.
Goto: http://scintilla.sourceforge.net/SciTEDownload.html

Click on the "full download" link.

Once you have downloaded the zip file open it and extract SciLexer.dll to your Windows System32 folder.




Thanks,

Brad